home *** CD-ROM | disk | FTP | other *** search
- Path: news.iadfw.net!usenet
- From: Mark Nelson <markn@airmail.net>
- Newsgroups: comp.lang.c++
- Subject: Re: Please help w/ Stack implementation
- Date: Sun, 03 Mar 1996 21:55:24 -0600
- Organization: customer of Internet America
- Message-ID: <313A69AC.70F@airmail.net>
- References: <4hbee8$b6h@wintermute.ecs.fullerton.edu>
- NNTP-Posting-Host: dal20-19.ppp.iadfw.net
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0GoldB1 (Win95; I)
-
- > But how do I handle Pop()?
-
- I don't think there is any good way to return a reference from
- Pop(). The STL bypasses this issue by not breaking the reference
- and pop into two separate functions.
-
- It should be easy enough to simply return a copy of the top of the
- stack, however. It just means people have to be aware of the
- semantics of their copy constructor and assignment operator.
-
- Mark Nelson
- http://web2.airmail.net/markn
-